<template>
  <yd-ls-layout :title="comName" :onfoot=false :tolfurl="urls" style="background-color: rgb(255,255,255)">
    <div class="yd-ls-height"></div>
    <div class="yd-ls-about">
      <div class="yd-ls-about-img">
        <img :src="profile.logo" width="80%" height="80%" alt="" />
      </div>
      <p>{{ profile.version }}</p>
    </div>

    <yd-ls-content>
      <div slot="content">
        <div v-html="profile.desc"></div>
      </div>
    </yd-ls-content>
    <yd-backtop></yd-backtop>
  </yd-ls-layout>
</template>

<style>
.yd-ls-about {
  width: 100%;
  overflow: hidden;
  text-align: center;
  padding: 0.2rem;
  background-color: rgb(72, 112, 243);
}
.yd-ls-about .yd-ls-about-img {
  display: inline-block;
  width: 1.14rem;
  height: 1.14rem;
  line-height: 1.14rem;
  overflow: hidden;
  background-color: #fff;
  border-radius: 50%;
}
.yd-ls-about .yd-ls-about-img img {
  width: 80%;
  height: 80%;
  vertical-align: middle;
}
.yd-ls-about p {
  margin-top: 0.1rem;
  font-size: 0.28rem;
  line-height: 0.64rem;
  color: #fff;
}
</style>
<script>
import ydLsLayout from "../../../components/yd-ls-layout.vue";
import ydLsContent from "../../../components/yd-ls-content.vue";
import api from "../../../axios/api";

export default {
  name: "about",
  data() {
    return {
      urls: "index.html#/setting",
      comName: "关于"+api.default_title,
      profile: {}
    };
  },
  methods: {
    init() {
      this.getProfile();
    },
    getProfile() {
      this.$dialog.loading.open(api.default_loading_txt);
      this.axios.get(api.base_profile).then(m => {
        let base_profile_data = m.data;
        this.profile = base_profile_data.data;
        this.$dialog.loading.close()
      }).catch(err=>{
          this.$dialog.loading.close()
          this.$dialog.alert({mes: JSON.stringify(err)})
        })
    }
  },
  mounted() {
    this.init();
  },
  components: { ydLsLayout, ydLsContent }
};
</script>
